﻿<UserControl x:Class="TextAdventures.Quest.EditorControls.ExpressionControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="50" d:DesignWidth="300">
    <UserControl.Resources>
        <LinearGradientBrush x:Key="InsertButtonBackground" EndPoint="0,1">
            <GradientStop Color="#FF6060FF" Offset="0" />
            <GradientStop Color="#FF8080FF" Offset="0.5" />
            <GradientStop Color="#FFA0A0FF" Offset="0.5" />
            <GradientStop Color="#FFC0C0FF" Offset="1" />
        </LinearGradientBrush>
    </UserControl.Resources>
    <Grid Name="grid">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <ComboBox Name="lstType" SelectionChanged="lstType_SelectionChanged" Margin="0,0,10,0" VerticalAlignment="Top" />
        <ComboBox Name="lstTemplate" SelectionChanged="lstTemplate_SelectionChanged" Margin="0,0,10,0" Visibility="Collapsed" VerticalAlignment="Top" />
        <TextBox Name="txtExpression" Grid.Column="1" TextChanged="txtExpression_TextChanged" LostFocus="txtExpression_LostFocus" HorizontalScrollBarVisibility="Auto" MinWidth="40" MinHeight="20" VerticalContentAlignment="Center"></TextBox>
        <Button Name="cmdInsert" Click="cmdInsert_Click"  Grid.Column="2" Padding="1,0,1,0" Margin="0,0,0,0" Background="{StaticResource InsertButtonBackground}" Foreground="White" ToolTip="Insert..." VerticalAlignment="Top" Height="{Binding ElementName=lstType, Path=ActualHeight}" MinHeight="22" >
            <Button.FontFamily>Marlett</Button.FontFamily>
            <Button.Content>u</Button.Content>
            <Button.ContextMenu>
                <ContextMenu Name="mnuInsertMenu"/>
            </Button.ContextMenu>
        </Button>
    </Grid>
</UserControl>
